# Contributor: Patrycja Rosa <alpine@ptrcnull.me>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=reredirect
pkgver=0.3
pkgrel=0
pkgdesc="Tool to dynamicly redirect outputs of a running process"
url="https://github.com/jerome-pouiller/reredirect/"
arch="all !aarch64 !s390x !ppc64le !riscv64 !loongarch64" # "unsupported"
license="MIT"
makedepends="linux-headers"
subpackages="$pkgname-doc"
source="https://github.com/jerome-pouiller/reredirect/archive/refs/tags/v$pkgver/reredirect-$pkgver.tar.gz
	$pkgname-ptrace-request.patch::https://github.com/jerome-pouiller/reredirect/commit/db3055d1ebc43852d1b5847d12e83f359d3f499f.patch
	"
options="!check" # requires root and ptracing another process

build() {
	make
}

package() {
	make PREFIX=/usr DESTDIR="$pkgdir" install
}

sha512sums="
5164d0f347693f13047f76e923ceb7f7f73f746514baff3ddcac2546f6f3f981f01d3f9326b439b98ce503036662d3157c57c628a3b4a576db94a5a22333b531  reredirect-0.3.tar.gz
8b324096c597c0e6dfc69991ea526e3fbfca7078ec3266ea8dca1148365457b4e9f49241912f8a61ee92f7a6e0e8ea21cbfecffc32a14fb206aa4221b216f9f5  reredirect-ptrace-request.patch
"
